import requests from './request'
// 注册
export const register = (data, code) => requests({ url: '/user/register', data: data, params: code, method: 'post' })

// 判断用户名是否存在
export const checkUsername = (username) => requests({ url: '/user/checkUserName/' + username, method: 'post' })

// 退出登录
export const logout = () => requests({ url: '/user/logout', method: 'get' })

// 发送验证码
export const sendCode = (email) => requests({ url: '/user/sendCode?email=' + email, method: 'post' })

// 获取用户信息
export const getUserInfo = () => requests({ url: '/user/getUser', method: 'post' })

// 修改用户信息
export const updateUserInfo = (data) => requests({ url: '/user/updateUser', data: data, method: 'post' })
